<%--
  Created by IntelliJ IDEA.
  User: free
  Date: 2017/11/4
  Time: 14:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/top.css">
    <script src="${pageContext.request.contextPath}/resources/js/top.js" type="text/javascript"></script>
</head>
<body>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <nav class="navbar navbar-default" role="navigation">

                <div class="navbar-header ">
                     <ul class="nav navbar-nav">
                         <li class="dropdown">
                             <a class="navbar-brand" href="${pageContext.request.contextPath}/jsp/student/index.jsp">首页</a>
                         </li>
                     </ul>
                </div>

                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav">

                        <li><a href="${pageContext.request.contextPath}/jsp/student/videoLearn.jsp">视频学习</a></li>

                        <li class="dropdown">
                            <a href="#"  class="dropdown-toggle" data-toggle="dropdown">API<strong class="caret"></strong></a>
                            <ul class="dropdown-menu">
                                <li><a href="${pageContext.request.contextPath}/jsp/student/translate.jsp">百度翻译</a></li>
                                <li class="divider"></li>
                                <li><a href="${pageContext.request.contextPath}/jsp/student/map.jsp">百度地图</a></li>
                            </ul>
                        </li>

                        <li><a href="#">&nbsp;</a></li>
                        <li><a href="#">&nbsp;</a></li>
                        <li class="dropdown">
                            <a href="#" id="searchText" class="dropdown-toggle" data-toggle="dropdown">百度<strong class="caret"></strong></a>
                            <ul class="dropdown-menu">
                                <li><img src="${pageContext.request.contextPath}/resources/images/search/百度.png" alt="百度" style="width:140px;height:40px;margin-left: 10px"></li>
                                <li class="divider"></li>
                                <li><img src="${pageContext.request.contextPath}/resources/images/search/搜狗.png" alt="搜狗" style="width:140px;height:40px;margin-left: 8px"></li>
                                <li class="divider"></li>
                                <li><img src="${pageContext.request.contextPath}/resources/images/search/谷歌.png" alt="谷歌" style="width:140px;height:40px;margin-left: 10px"></li>
                            </ul>
                        </li>
                    </ul>
                        <form class="navbar-form navbar-left" role="search" >
                            <div class="form-group">
                                <input type="text" class="form-control" id="searchContext"/>
                            </div>
                            <button type="submit" class="btn btn-default" onclick="goSearch()">搜索</button>

                        </form>
                    </ul>

                    <ul class="nav navbar-nav navbar-right">
                        <li class="dropdown">
                            <% if(request.getSession().getAttribute("student")==null||request.getSession().getAttribute("student").equals("")){%>
                            <%=request.getSession().getAttribute("student")%>
                            <li><a href="${pageContext.request.contextPath}/jsp/student/login.jsp">登录</a></li>
                            <li><a href="${pageContext.request.contextPath}/jsp/student/register.jsp">注册</a></li>
                            <%}else{%>
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">${student.student_name}</a>

                            <li><a href="/login?action=logout&identity=student">注销</a></li>
                            <%}%>
                        </li>
                    </ul>
                </div>

            </nav>
        </div>
    </div>
</div>
</body>
</html>
